package grape.crm.rest.department.vo;
import grape.common.rest.vo.BaseIdVo;

import grape.common.rest.vo.BaseTreeVo;
import grape.common.service.trans.TransBy;
import grape.common.service.trans.TransItem;
import grape.crm.service.company.api.ICompanyService;
import grape.crm.service.department.api.IDepartmentService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author yangwei
 * @since 2020-09-14
 */
@TransItem(type = IDepartmentService.trans_department_parent_name, byFieldName = "parentId",forFieldName = "parentName")

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="部门数据响应对象")
public class DepartmentVo extends BaseTreeVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "部门编码")
    private String code;

    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "公司id")
    private String companyId;

    @TransBy(type = ICompanyService.trans_company_name,byFieldName = "companyId")
    @ApiModelProperty(value = "客户所在公司名称")
    private String companyName;

    @ApiModelProperty(value = "描述")
    private String remark;


}
